import Layout from '../../views/layout/Layout'

const asyncRouterMap = {
  path: '/user',
  component: Layout,
  redirect: '/user/list',
  meta: {
    title: '用户管理',
    icon: 'table'
  },
  children: [
    // 用户列表
    {
      path: 'list',
      name: 'user',
      component: () => import('@/views/user/index'),
      meta: { title: '用户列表', icon: 'user', permission: '/user/list' }
    },
    {
      path: 'addUser',
      name: 'addUser',
      component: () => import('@/views/user/addUser'),
      meta: { title: '添加用户', permission: '/user/addUser' },
      hidden: true
    },
    {
      path: 'editUser',
      name: 'editUser',
      component: () => import('@/views/user/editUser'),
      meta: { title: '用户信息', permission: '/user/editUser' },
      hidden: true
    }
    // {
    //   path: 'setRoles',
    //   name: 'setRoles',
    //   component: () => import('@/views/user/setRoles'),
    //   meta: { title: '授权角色', permission: '/user/setRoles' },
    //   hidden: true
    // },
    // // 权限控制
    // {
    //   path: 'permission',
    //   name: 'permission',
    //   component: () => import('@/views/permission/index'),
    //   meta: { title: '权限管理', icon: 'form', permission: '/user/permission' }
    // },
    // {
    //   path: 'addPermission',
    //   name: 'addPermission',
    //   component: () => import('@/views/permission/addPermission'),
    //   meta: { title: '权限添加', permission: '/user/addPermission' },
    //   hidden: true
    // },
    // {
    //   path: 'editPermission',
    //   name: 'editPermission',
    //   component: () => import('@/views/permission/editPermission'),
    //   meta: { title: '权限编辑', permission: '/user/editPermission' },
    //   hidden: true
    // },
    // // 角色管理
    // {
    //   path: 'role',
    //   name: 'role',
    //   component: () => import('@/views/role/index'),
    //   meta: { title: '角色管理', icon: 'link', permission: '/user/role' }
    // },
    // {
    //   path: 'addRole',
    //   name: 'addRole',
    //   component: () => import('@/views/role/addRole'),
    //   meta: { title: '添加角色', permission: '/user/addRole' },
    //   hidden: true
    // },
    // {
    //   path: 'editRole',
    //   name: 'editRole',
    //   component: () => import('@/views/role/editRole'),
    //   meta: { title: '角色编辑', permission: '/user/editRole' },
    //   hidden: true
    // }
  ]
}

export default asyncRouterMap
